/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package smurf.view;

/**
 * TaskProgressDialog displays the progress of a task
 * 
 * @author Bishan Kumar Madhoo <bishan.madhoo@idsoft.mu>
 * @version 1.0
 */
public class TaskProgressDialog extends javax.swing.JDialog {

    /**
     * Creates new form TaskProgressDialog
     */
    public TaskProgressDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The
     * content of this method is always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        contentPanel = new javax.swing.JPanel();
        taskDescriptionPanel = new javax.swing.JPanel();
        taskProgressBar = new javax.swing.JProgressBar();
        taskDescriptionLabel = new javax.swing.JLabel();
        taskActionPanel = new javax.swing.JPanel();
        taskCancelButton = new javax.swing.JButton();

        setTitle("SMURF");
        setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);
        setName("TaskProgressDialog"); // NOI18N
        setResizable(false);

        contentPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
        contentPanel.setLayout(new java.awt.BorderLayout());

        taskDescriptionLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);

        org.jdesktop.layout.GroupLayout taskDescriptionPanelLayout = new org.jdesktop.layout.GroupLayout(taskDescriptionPanel);
        taskDescriptionPanel.setLayout(taskDescriptionPanelLayout);
        taskDescriptionPanelLayout.setHorizontalGroup(
            taskDescriptionPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(taskProgressBar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 366, Short.MAX_VALUE)
            .add(taskDescriptionLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        taskDescriptionPanelLayout.setVerticalGroup(
            taskDescriptionPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(taskDescriptionPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(taskProgressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(taskDescriptionLabel)
                .addContainerGap(24, Short.MAX_VALUE))
        );

        contentPanel.add(taskDescriptionPanel, java.awt.BorderLayout.CENTER);

        taskActionPanel.setMaximumSize(new java.awt.Dimension(32767, 30));
        taskActionPanel.setMinimumSize(new java.awt.Dimension(100, 30));
        taskActionPanel.setPreferredSize(new java.awt.Dimension(334, 30));
        taskActionPanel.setLayout(new java.awt.GridBagLayout());

        taskCancelButton.setActionCommand("CANCEL_FETCHING");
        taskCancelButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        taskActionPanel.add(taskCancelButton, new java.awt.GridBagConstraints());

        contentPanel.add(taskActionPanel, java.awt.BorderLayout.SOUTH);

        getContentPane().add(contentPanel, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel contentPanel;
    private javax.swing.JPanel taskActionPanel;
    public javax.swing.JButton taskCancelButton;
    public javax.swing.JLabel taskDescriptionLabel;
    private javax.swing.JPanel taskDescriptionPanel;
    public javax.swing.JProgressBar taskProgressBar;
    // End of variables declaration//GEN-END:variables
}
